import { Component} from '@angular/core';
import { NavController,ModalController} from 'ionic-angular';
import { PublishSport} from '../publish-sport/publish-sport';
// import {SignOrlogin} from "../sign-orlogin/sign-orlogin";
// declare var AMap;

@Component({
  selector: 'page-sport',
  templateUrl: 'sport.html'
})
export class SportPage {
	pages: Array<{title: string, component: any}>;
  public map: any;

  constructor(public navCtrl: NavController,
              public modalCtrl: ModalController,) {
  	 this.pages = [

      { title: '小俊', component: '这是一个非常帅的人' },

      { title: '香格里拉', component: '这是一个美丽的地方' },

      { title: '汉堡', component: '这是一种好吃的东西'},

    ];
  	 // this.loadMap();
  }

 //打开约运动界面
  openPublishSport(){

    let myModal = this.modalCtrl.create(PublishSport);
    myModal.present();
  	// this.navCtrl.push(PublishSport);
  }
  ionViewWillEnter(){
    // this.loadMap();
    console.log("进入运动界面");
  }
//   loadMap() {
//     this.map = new AMap.Map('container', {
//       resizeEnable: true,
//       zoom: 8,
//       center: [116.39,39.9]
//     });
// }

}
